using System.ComponentModel.DataAnnotations;
using SqlSugar;

namespace TaskProject.Domain.Plan
{
    /// <summary>
    /// 生产计划操作记录模型
    /// </summary>
    public class ProductionPlanOperationLogModel
    {
        /// <summary>
        /// 操作记录ID（主键）
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        [Key]
        public int LogId { get; set; }

        /// <summary>
        /// 生产计划ID（外键）
        /// </summary>
        public int PlanId { get; set; }

        /// <summary>
        /// 操作类型（1-创建，2-编辑，3-启动，4-暂停，5-恢复，6-完成，7-取消，8-删除）
        /// </summary>
        public int OperationType { get; set; }

        /// <summary>
        /// 操作类型名称
        /// </summary>
        [MaxLength(50)]
        public string OperationTypeName { get; set; }

        /// <summary>
        /// 操作描述
        /// </summary>
        [MaxLength(500)]
        public string? OperationDescription { get; set; }

        /// <summary>
        /// 操作前状态
        /// </summary>
        public int BeforeStatus { get; set; }

        /// <summary>
        /// 操作后状态
        /// </summary>
        public int? AfterStatus { get; set; }

        /// <summary>
        /// 操作人
        /// </summary>
        [Required]
        [MaxLength(50)]
        public string OperatorName { get; set; }

        /// <summary>
        /// 操作时间
        /// </summary>
        public DateTime OperationTime { get; set; }

        /// <summary>
        /// IP地址
        /// </summary>
        [MaxLength(50)]
        public string? IpAddress { get; set; } = string.Empty;

        /// <summary>
        /// 备注
        /// </summary>
        [MaxLength(500)]
        public string? Remarks { get; set; }
    }
} 